package FinalTest03;

public class SumTest {
    int sum=0;
    public void sum(){
        for (int i = 1; i < 101; i++) {
            if (i %2 != 0) {
                sum += i;
            }
        }
        System.out.println("1~100之间所有的奇数和：" + sum);
    }
}
